local jute = require('jute')

local host = 'localhost'
local port = 2181 --
local status = {
  zxid = 0,               -- Uint8Array[8]
  sessionTimeout = 3000,
  sessionId = 0 ,         -- Uint8Array[8]
  sessionPassword = ""    -- Uint8Array[16]
}

local request = jute.pack(
  "ConnectRequest",
  jute.PROTOCOL_VERSION,
  status.zxid,
  status.sessionTimeout,
  status.sessionId,
  status.sessionPassword
)

local response = jute.unpack("ConnectRequest", request)
for k,v in pairs(response) do
  print(k,v)
end
